Atmospheric variability

The ERA5 reanalysis dataset provides information about the atmosphere that can help contextualize sea ice conditions. Here, we’ll plot 2 meter temperature and downwelling longwave radiation from ERA5 to get a sense for the atmospheric conditions during each winter season.

import xarray as xr # For working with gridded climate data 
from utils.read_data_utils import read_book_data # Helper function for reading the data from the bucket
from utils.plotting_utils import static_winter_comparison_lineplot, staticArcticMaps, interactiveArcticMaps, compute_gridcell_winter_means # Plotting utils 

# Plotting dependencies
%config InlineBackend.figure_format = 'retina'
import matplotlib as mpl
mpl.rcParams['figure.dpi'] = 150 # Sets figure size in the notebook

# Remove warnings to improve display
import warnings 
warnings.filterwarnings('ignore') 

Read in the data

book_ds = read_book_data() # Read/download the data 
book_ds = book_ds.where(book_ds.region_mask.isin([1,2,3,4,5,6])) # Restrict to the inner arctic 
years = [2018,2019,2020] # Years over which to perform analysis
save_label='Inner_Arctic_MYI'

# Uncomment out to set an additional ice type mask too and change the save_label accordingly (0 = FYI, 1 = MYI)
book_ds = book_ds.where(book_ds.ice_type==1)
Downloading jupyter book data from the google storage bucket...
If you experience problems with multiprocessing on MacOS, they might be related to https://bugs.python.org/issue33725. You can disable multiprocessing by editing your .boto config or by adding the following flag to your command: `-o "GSUtil:parallel_process_count=1"`. Note that multithreading is still available even if you disable multiprocessing.

Copying gs://sea-ice-thickness-data/icesat2-book-data/icesat2-book-data.nc...
/ [0/1 files][    0.0 B/329.4 MiB]   0% Done                                    
-
- [0/1 files][264.0 KiB/329.4 MiB]   0% Done                                    
\
|
| [0/1 files][ 18.6 MiB/329.4 MiB]   5% Done                                    
/
/ [0/1 files][ 56.0 MiB/329.4 MiB]  16% Done                                    
-
\
\ [0/1 files][ 89.5 MiB/329.4 MiB]  27% Done                                    
|
| [0/1 files][122.7 MiB/329.4 MiB]  37% Done                                    
/
-
- [0/1 files][157.3 MiB/329.4 MiB]  47% Done                                    
\
|
| [0/1 files][193.6 MiB/329.4 MiB]  58% Done                                    
/
-
- [0/1 files][234.6 MiB/329.4 MiB]  71% Done                                    
\
\ [0/1 files][273.3 MiB/329.4 MiB]  82% Done                                    
|
/
/ [0/1 files][313.2 MiB/329.4 MiB]  95% Done                                    
-
- [1/1 files][329.4 MiB/329.4 MiB] 100% Done  35.3 MiB/s ETA 00:00:00           
Operation completed over 1 objects/329.4 MiB.                                    
Download complete

Map monthly data

Here, we’ll use the interactiveArcticMaps function to display the data. You can change the variable to display by changing data_var in the code cell below if you run the notebook in Binder.

data_var = "t2m"
interactiveArcticMaps(book_ds[data_var], cmap="coolwarm", frame_width=500)

Map and plot the winter means

Below, we’ll compute gridcell means for each month for each variable. Then, we’ll plot the means on a map of the Arctic, and display them next to each other for easy visual comparison.

# Maps of the means 
t2m_winter_means = compute_gridcell_winter_means(book_ds.t2m, years=years)
pl = staticArcticMaps(t2m_winter_means, title="Winter mean 2 meter tempertaure", cmap="coolwarm", vmin=-40, vmax=-15)
display(pl)

# Mean monthly lineplot
static_winter_comparison_lineplot(book_ds.t2m, years=years,  figsize=(5,3), save_label=save_label, legend=True)
../_images/atmospheric_variables_7_0.png ../_images/atmospheric_variables_7_1.png
# Maps of the means 
msdwlwrf_winter_means = compute_gridcell_winter_means(book_ds.msdwlwrf, years=years)
pl = staticArcticMaps(msdwlwrf_winter_means, cmap="pink_r", vmin=160, vmax=240)
display(pl)

# Mean monthly lineplot
static_winter_comparison_lineplot(book_ds.msdwlwrf, years=years, figsize=(5,3), set_ylabel=r'Downward longwave radiative flux (W/m$^2$)', save_label=save_label, legend=True)
../_images/atmospheric_variables_8_0.png ../_images/atmospheric_variables_8_1.png